package cn.edu.bcu.ls.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import cn.edu.bcu.ls.utils.LoadUtil;

@RestController
public class LoadController {
		
	@PostMapping(value="Load")
	public String upload( @RequestParam(value = "file" ) MultipartFile files,
			RedirectAttributes redirectAttributes, HttpServletRequest request) {
		
				return LoadUtil.upload(files, request);
		
	}
	
}
